package com.yanqu.road.server.manger.kowloon.battle.role;

import com.yanqu.road.server.manger.kowloon.battle.KowloonGame;
import com.yanqu.road.entity.kowloon.common.Vec2;

public class KowloonRole {

    /**
     * 游戏相关数据
     */
    public KowloonGame game;

    public int id;

    public Vec2 speed = new Vec2();

    public Vec2 pos = new Vec2();

    public KowloonRole(KowloonGame game) {
        this.game = game;
        this.id = game.getId();
    }

    public void update(double dt) {
        this.updateData(dt);
        this.updatePos(dt);
        this.updateAI(dt);
    }

    public void updateData(double dt) {

    }

    public void updatePos(double dt) {
        this.pos.setX(this.pos.getX() + this.speed.getX() * dt);
        this.pos.setY(this.pos.getY() + this.speed.getY() * dt);
    }

    public void updateAI(double dt) {

    }
}
